package com.atguigu.eduService.controller;

import com.atguigu.commonutils.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

/**
 * @author: 亚当
 * @date: 2022年06月17日 17:20
 * @package: com.atguigu.eduService.controller
 * @Description: TODO
 */
@RestController
@RequestMapping("/eduService/user")
@CrossOrigin //解决跨域
public class EduLoginController {
    //login
    @PostMapping("login")
    public R login(){
        return R.ok().data("token","admin");
    }
    //info
    @GetMapping("info")
    public R info(){
        return R.ok().data("roles","[admin]").data("name","admin").data("avatar","https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.touxiangwu.com%2Fuploads%2Fallimg%2F2021090314%2Fvxvixlnbsou.jpg&refer=http%3A%2F%2Fimg.touxiangwu.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1658107928&t=8e693023809ef502d0c43dc994df171d");
    }
}
